@extends('admin.layouts.wap')
@section('title', '小程序代码上架')

@section('content')
<link href="/assets/css/miniapp-publish.css" rel="stylesheet">
<div class="mview-card-content" style="background-color:#FFFFFF;padding-top: 10px;">
    <div class="card-body">
        <div class="m-form-item">
            <label><b>*</b>小程序名称:<font>需和公司相关,点击<a onclick="getName();" href="javascript:;">随机生成</a></font></label>
            <div class="m-col-6 m-xs-12">
                <input type="hidden" name="appid" id="appid" value="{{ $miniapp->appid }}">
                <input type="text" class="m-input" name="nickname" id="nickname" placeholder="请输入小程序名称" value="{{ $basicInfo['nickname'] }}" maxlength="35" @if(in_array($miniapp->status,[1,6,8])) disabled="disabled" @endif>
                <input id="appid" value="{{ $basicInfo['appid'] }}" type="hidden">
            </div>
        </div>
        <div class="m-form-item">
            <label><b>*</b>小程序简介:<font>本月已修改 {{ $basicInfo['signature_info']['modify_used_count'] }} 次,还可修改 {{ $basicInfo['signature_info']['modify_quota'] }} 次。</font></label>
            <textarea class="m-textarea" name="signature" id="signature" placeholder="请输入微信小程序简介" maxlength="120">{{ empty($basicInfo['signature_info']['signature']) ? "企业线下展会/活动开展小助手!" : $basicInfo['signature_info']['signature'] }}</textarea>
        </div>
        <div class="m-form-item">
            <label><b>*</b>小程序头像:<font>您可以上传或,点击<a onclick="getHeadImg();" href="javascript:;">随机生成</a></font></label>
            <div>
                <a href="javascript:;" class="m-file">
                    <font>上传</font>
                    <input type="file" accept="image/*" name="medias_images" id="medias_images" onchange="jsUpload('media_id',500);">
                </a>
                <img src="{{ $basicInfo['head_image_info']['head_image_url'] }}" class="m-file-image" id="media_id_show">
                <input type="hidden" name="media_id" id="media_id" value="{{ old('media_id') }}">
                <input type="hidden" name="head_image_url" id="head_image_url" value="{{ $basicInfo['head_image_info']['head_image_url'] }}">
                <input type="hidden" id="users_id" value="{{ encrypt(Auth::user()->id) }}">
            </div>
        </div>
        <div class="m-form-item">
            <label><b>*</b>小程序类目:</label>
            <div class="m-col-6 m-xs-6" style="padding-right: 8px;box-sizing: border-box;">
                <select class="m-select" id="categorie" onchange="categorieChange();">
                    <option value="">请选择您的行业</option>
                </select>
            </div>
            <div id="categorie_chlid_row" class="m-col-6 m-xs-6" style="padding-left: 8px;display:none;box-sizing: border-box;">
                <select class="m-select" id="categorie_chlid"></select>
            </div>
        </div>
        <div class="m-form-item" id="license_row" style="display: none;">
            <label><b>*</b>组织机构代码证:</label>
            <div class="m-col-6 m-xs-12">
                <input type="text" class="m-input" name="license" id="license" placeholder="请输入组织机构代码证" value="{{ old('license') }}">
            </div>
        </div>
        <div class="m-form-item" id="naming_other_stuff_row" style="display: none;">
            <label><b>*</b>营业执照:</label>
            <div>
                <a href="javascript:;" class="m-file">
                    <font>上传</font>
                    <input type="file" accept="image/*" name="naming_other_stuff_1" id="naming_other_stuff_1" onchange="uploadWeixinMedia('naming_other_stuff',2048,false);">
                </a>
                <img src="" class="m-file-image" id="naming_other_stuff_show" style="display:none;">
                <input type="hidden" name="naming_other_stuff" id="naming_other_stuff" value="{{ old('naming_other_stuff') }}">
            </div>
        </div>
        <div class="m-form-item">
            @if($miniapp->pay_status == 1)
            <div class="mini-detial-btn m-mr-1" onclick='mviewNotification("info","账户扣费提醒","提交审核会扣除账号 10积分 ，扣除完成提交小程序审核及备案均无需重复支付！","确认提交","取消",{"type":"mini_publish"});'>提交小程序审核</div>
            @else
            <div class="mini-detial-btn m-mr-1" onclick="minappPublishSubmit();">提交小程序审核</div>
            @endif
        </div>
        <div class="m-info-item m-mt-1">
            <label>上架微信小程序说明：</label>
            <div class="text">
                <ul>
                    <li>1、小程序名称不要包含"微信"等禁用词汇；</li>
                    <li>2、小程序描述认真填写否则可能无法通过审核。</li>
                </ul>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/assets/admin/js/dev/image.upload.875451.js?v={{ time() }}"></script>
<script type="text/javascript" src="https://file.wailian1.cn/admin/assets/admin/js/libs/image-conversion/conversion.js"></script>
<script type="text/javascript" src="/assets/admin/js/dev/miniapp.setting.875451.js?v={{ time() }}"></script>
<script src="/js/public/links-upload.js?v=2023071001"></script>
<script src="/assets/js/localResizeIMG/lrz.all.bundle.js"></script>
<script type="text/javascript">
    var categories = {!! $categories !!};
    $(document).ready(function(){
        renderCategories();
        setTimeout(function() {
            $("#categorie").val(287);
            categorieChange();
            setTimeout(function() {
                $("#categorie_chlid").val(698);
            },200);
        },200);
    });
</script>
@endsection
